package nc.vo.arap.newbalancequery.task;

import nc.vo.arap.func.ProxyReporter;
import nc.vo.arap.pub.PubConstData;
import nc.vo.arap.pub.QueryStructVO;
import nc.vo.arap.pub.RSTransferVO;
import nc.vo.arap.pub.report.ReportTask;
import nc.vo.pub.BusinessException;

public class BalRSQueryTask implements ReportTask<RSTransferVO> {
	
	private QueryStructVO voStruct;
	
	public BalRSQueryTask(QueryStructVO voStruct) {
		this.voStruct = voStruct;
	}

	public RSTransferVO doTask() throws BusinessException {
		if(voStruct.getIfx() == PubConstData.YS_SK)
			return ProxyReporter.getIArapBalanceQueryPrivate().getQueryResultYeb(voStruct);
		else if(voStruct.getIfx() == PubConstData.YS)
			return ProxyReporter.getIArapBalanceQueryPrivate().getQueryResultYskyeb(voStruct);
		else {
			voStruct.setIncludeyffk(true);
			return ProxyReporter.getIArapBalanceQueryPrivate().getQueryResultWlYeb(voStruct);
		}
	}

}
